#!/bin/sh

## a script to manage RCS tag _Id_
## an '_Id_' tagged text file will be renewed
## with an empty tag.
## %_loc: _home_/bin %

## $Id$

for file in ./*; do

	if [  -e $file -a ! -d $file ]; then
		tmp_file=`mktemp $file.XXXXXX` || exit 1
		cp -P $file $file.orig
		cp -P $file $tmp_file
		cat $tmp_file | \
			sed "s|^## [$]Id.*|## \$Id\$|g" | \
			sed "s|[$]Id.*|\$Id\$|g" > $file
		rm -f $tmp_file
	fi
done

exit 0
